package com.aispeech.asr.apis.ssc.config;

import com.aispeech.asr.apis.ssc.service.TaskSchdService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

@Configuration
@EnableScheduling
@Slf4j
public class ScheduleConfig {
    @Autowired
    TaskSchdService schdService;

    @Scheduled(cron = "${apis.ssc.cron-task}")
    public void cronTask() {
        schdService.run();
    }
}
